home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 9
/
The PC-SIG Library on CD ROM - Ninth Edition.iso
/
401_500
/
DISK0417
/
DISK0417.ZIP
/
PROLOG.ARC
/
LOGIC.ARC
/
SKOLEM.DOC
next >
Wrap
Text File
|
1986-11-07
|
1KB
|
26 lines
Contributed by Jim Adams of Bendix Aerospace.
The files "SKOLEM.OPS" and "SKOLEM.PRO" implement the translate
program described in C&M Appendix B and discussed in Chapter 10.
This is the program that translates predicate calculus statements
into Prolog statements. The program is named SKOLEM.PRO and is
started on the command line with "pdprolog SKOLEM.OPS". To
translate a predicate calculus statement you type, e.g. Three
sample predicate calculus statements are included in "SKOLEM.OPS"
and may be commented out.
?- translate(all(X,s(X)<->exists(Y,e(X,Y)))).
The answer should be something like:
s(X_1) :- e(X_1,Y_10).
e(X_1,f1(X_1) :- s(X_1).
(The particular example comes from "x is a set iff there is a y
such that x is an element of y", the first axiom of set theory.)
The op codes are found in trans.ops and follow C&M:
<-> if and only if
-> implies
& and
# or
~ not